/*----------------------------------------------------------
* FILE: EdSugeridaCorreo.java
* LOGICAL NAME: EdSugeridaCorreo
* PRODUCT: jsiit-model
*----------------------------------------------------------
* IMPORTANT NOTICE
* This program is property of DAI ( Development Alternatives Inc )
* Its unauthorized use, as any code alteration without authorization 
* is prohibited
*----------------------------------------------------------
* MODIFICATIONS
* DATE 12/07/2010
* AUTHOR nalopez
*----------------------------------------------------------
*/

package sv.gob.mh.dgii.model;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author TPAR
 * <b>Created by </b>nalopez
 * <b>for</b>jsiit-model
 * <b>on</b> 12/07/2010 11:52:54
 * <b>Purpose</b> 
 * <p>
 * </p>
 */

@Entity
@Table(name = "ED_SUGERIDA_CORREO", schema = "EDADEPUDOC")
public class EdSugeridaCorreo implements Serializable {

	private Long isugeridaCorreo;
	private String nit;
	private Date fpdeclaracion;
	private String cusuario;
	private Date fhingreso;
	private Long ncantDecl;
	private String mestado;
	private String smensaje;
	private Set<EdSugeridaCorreoDet> edSugeridaCorreoDets = new HashSet<EdSugeridaCorreoDet>(0);
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6050790778200404239L;

	/**
	 * 
	 */
	public EdSugeridaCorreo() {
	}
	
	public EdSugeridaCorreo(Long isugeridaCorreo, String nit, Date fpdeclaracion, String mestado, String smensaje) {
		this.isugeridaCorreo = isugeridaCorreo;
		this.nit = nit;
		this.fpdeclaracion = fpdeclaracion;
		this.mestado = mestado;
		this.smensaje = smensaje;
	}
	
	public EdSugeridaCorreo(Long isugeridaCorreo, String nit, Date fpdeclaracion, String cusuario, Date fhingreso, Long ncantDecl, String mestado, String smensaje, Set<EdSugeridaCorreoDet> edSugeridaCorreoDets) {
		this.isugeridaCorreo = isugeridaCorreo;
		this.nit = nit;
		this.fpdeclaracion = fpdeclaracion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.ncantDecl = ncantDecl;
		this.mestado = mestado;
		this.smensaje = smensaje;
		this.edSugeridaCorreoDets = edSugeridaCorreoDets;
	}

	@Id
	@Column(name = "I_SUGERIDA_CORREO", unique = true, nullable = false, insertable = true, updatable = true, precision = 18, scale = 0)
	public Long getIsugeridaCorreo() {
		return isugeridaCorreo;
	}

	public void setIsugeridaCorreo(Long isugeridaCorreo) {
		this.isugeridaCorreo = isugeridaCorreo;
	}

	@Column(name = "NIT", unique = false, nullable = false, insertable = true, updatable = true, length = 14)
	public String getNit() {
		return nit;
	}

	public void setNit(String nit) {
		this.nit = nit;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FP_DECLARACION", unique = false, nullable = false, insertable = true, updatable = true, length = 7)	
	public Date getFpdeclaracion() {
		return fpdeclaracion;
	}

	public void setFpdeclaracion(Date fpdeclaracion) {
		this.fpdeclaracion = fpdeclaracion;
	}

	@Column(name = "C_USUARIO", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public String getCusuario() {
		return cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFhingreso() {
		return fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "N_CANT_DECL", unique = true, nullable = true, insertable = true, updatable = true, precision = 18, scale = 0)
	public Long getNcantDecl() {
		return ncantDecl;
	}
	
	public void setNcantDecl(Long ncantDecl) {
		this.ncantDecl = ncantDecl;
	}

	@Column(name = "M_ESTADO", unique = false, nullable = true, insertable = true, updatable = true, length = 1)
	public String getMestado() {
		return mestado;
	}

	public void setMestado(String mestado) {
		this.mestado = mestado;
	}

	@Column(name = "S_MENSAJE", unique = false, nullable = true, insertable = true, updatable = true, length = 1)
	public String getSmensaje() {
		return smensaje;
	}

	public void setSmensaje(String smensaje) {
		this.smensaje = smensaje;
	}
	
	@OneToMany( fetch = FetchType.LAZY, mappedBy = "edSugeridaCorreo" )
	public Set<EdSugeridaCorreoDet> getEdSugeridaCorreoDets() {
		return edSugeridaCorreoDets;
	}

	public void setEdSugeridaCorreoDets(
			Set<EdSugeridaCorreoDet> edSugeridaCorreoDets) {
		this.edSugeridaCorreoDets = edSugeridaCorreoDets;
	}
	

}
